# !/usr/bin/env python
# -*- coding: UTF-8 -*-
# author: 'xiazhiquan'
# date: '11-7-31'


from datetime import datetime, timedelta, date

class timeutil:
    def getCNnow(self):
        return datetime.utcnow() + timedelta(hours=+8)


    def getCNdate(self):
        fdate = getCNnow()
        return date(fdate.year, fdate.month, fdate.day)

    def getCNNowFormat(self, format):
        now = self.getCNnow()
        return now.strftime(format)